Skip to content

The net zone's words reach the log marked, bounded and as text - #225

Merged
DevomB merged 3 commits into
mainfrom
net-zone-words
Oct 7, 2026
Merged

DevomB merged 3 commits into
mainfrom
net-zone-words

Conversation

@DevomB

@DevomB DevomB commented Oct 5, 2026

Copy link
Copy Markdown
Owner

The net zone is run by its own service, not the launch service, and so got no relay: it wrote straight to the service's stdout, which is zone 0's catch-all log and, with it, the console. A net zone that has been taken over could write lines there that nothing marks as a zone's (kryptikd[zone net]: time-offset ... ok, netzone: READY ...), as many as it liked, with any bytes in them.

A host on the network could get part of the way without taking the zone: say was dash's echo, which acts on backslashes, and the script hands it words from the network, such as the reason a server gives for refusing the update statement.

Stacked on #223 (and so on #213): all three change netzone-init.sh.

The change:

  • build/services/net-zone/run starts the zone with --ready-fd 3 and 3>/dev/null. Nobody waits for the readiness line, but with it the launcher keeps the log and gives the zone a pipe (spawn.rs, ZoneOutput): each line is marked zone net| , control bytes are replaced, and one megabyte a start is the most that is logged. No Rust changes for this.
  • netzone-init.sh: say uses printf. The update helper's last line is taken as zone 0's answer only when the helper ended with status 0, so a failed fetch whose error text ends in ok ... or idle is said and not believed. The statement is asked for again at the next pass when a poll was still running, instead of a day later.
  • update-fetch.py prints its error on one line.
  • spawn.rs: the launcher no longer logs update-poll, update-put and version requests. A net zone makes them by the minute, and at 48 bytes each they used up the megabyte of broker lines in about fifteen days, after which no clock or update decision was logged until the zone restarted. What those calls decide is logged where it is decided.

The ceiling, said in the service file: a megabyte a start. A net zone that says more goes unlogged until it restarts; filling the allowance again by the hour is the way on.

Tests: tools/tests/netzone-words.sh, offline under sh, bash and dash: a backslash printed as it came, zone 0's ok taken, the same words after a failed fetch not taken, a failed poll said, a second run refused while one is going, and the service line itself. The suites' matches on the zone's lines are not anchored to a line's start, so the mark does not break them; the Distro run is the proof.

Not done here: the mark does not replace UTF-8 C1 control characters; a compromised net zone can still rename an uplink before it returns to zone 0.

DevomB added 2 commits October 5, 2026 10:39
…ervice starts it on a pipe, so the launcher marks each line as the zone's, replaces control bytes and logs a megabyte a start at most; the zone prints what the network says with printf, never echo; the update helper's last line counts as zone 0's answer only when the helper ended well; and the broker no longer logs the calls a net zone makes by the minute, which used up its log's bound in days
…e's resolv.conf, and no longer needs it to: it writes the servers dnsmasq has and one more, then takes it away
@DevomB
DevomB changed the base branch from net-zone-dns-refresh to main October 7, 2026 04:27
The one conflict is the zones suite's verdict list, whose line main now has
with #223's names and the policy and hidden-directory checks; this branch
adds nothing to it, so main's line stands.
@DevomB
DevomB marked this pull request as ready for review October 7, 2026 07:31
@DevomB
DevomB merged commit 1f28250 into main Oct 7, 2026
21 checks passed
@DevomB
DevomB deleted the net-zone-words branch October 7, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant